package com.binance.dynamodb.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import com.amazonaws.regions.Regions;

@ConfigurationProperties(prefix = "com.binance.amazon.dynamodb")
public class AmazonDynamoDBProperties {

    private boolean enabled;

    private String accessKey;

    private String secretKey;

    private String environment;

    @NestedConfigurationProperty
    private Endpoint endpoint = new Endpoint();

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getEnvironment() {
        return environment;
    }

    public void setEnvironment(String environment) {
        this.environment = environment;
    }

    public Endpoint getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(Endpoint endpoint) {
        this.endpoint = endpoint;
    }

    public static class Endpoint {
        private String serviceEndpoint = "http://localhost:8000";
        private String signingRegion = Regions.DEFAULT_REGION.getName();

        public String getServiceEndpoint() {
            return serviceEndpoint;
        }

        public void setServiceEndpoint(String serviceEndpoint) {
            this.serviceEndpoint = serviceEndpoint;
        }

        public String getSigningRegion() {
            return signingRegion;
        }

        public void setSigningRegion(String signingRegion) {
            this.signingRegion = signingRegion;
        }
    }
}
